//
//  ZFBBusinessTypeFlowLayout.m
//  ZFBCollectionDemo
//
//  Created by Apple on 2018/3/25.
//  Copyright © 2018年 techbird. All rights reserved.
//

#import "ZFBBusinessTypeFlowLayout.h"

@implementation ZFBBusinessTypeFlowLayout

/**
 这个方法只会调用两次，第一是在viewDidLoad创建时，第二次是在reloadData时
 */
-(void)prepareLayout{
    [super prepareLayout];
    
    //设置cell尺寸
    CGFloat itemW = self.collectionView.bounds.size.width / 4.0;
    CGFloat itemH = self.collectionView.bounds.size.height / 2.0;
    self.itemSize = CGSizeMake(itemW, itemH);
    
    //设置最小行列间距
    self.minimumLineSpacing = 0;
    self.minimumInteritemSpacing = 0;
    
    //滚动方向
    self.scrollDirection = UICollectionViewScrollDirectionHorizontal;
    
}

@end
